package com.charlotte.study.gupao.adapter.login.v2;


import com.alibaba.fastjson.JSON;
import com.charlotte.study.gupao.adapter.login.v1.BaseResponse;
import com.charlotte.study.gupao.adapter.login.v2.adapters.LoginForQQAdapter;
import com.charlotte.study.gupao.adapter.login.v2.adapters.LoginForWeiboAdapter;

import java.util.HashMap;
import java.util.Map;

/**
 * @author junjie.ding
 * @date 2020/3/11
 */
public class Test {

    public static void main(String[] args) {

        Map<String, Object> params = new HashMap<>();
        params.put("mid", "112353fadg43gvdaf");

        IPassportForThird adapter = new PassportForThirdAdapter();
        BaseResponse response = adapter.loginForThird(params, LoginForQQAdapter.class);

        System.out.println(JSON.toJSONString(response));


        response = adapter.loginForThird(params, LoginForWeiboAdapter.class);

        System.out.println(JSON.toJSONString(response));

    }
}
